home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Transactor
/
Transactor_08_1985_Transactor_Publishing.d64
/
menu prg
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
909b
|
36 lines
10 rem menu routine
15 rem tim buist
16 rem 2723 colton st. e.
17 rem grand rapids mi 49506
20 rem array a$() contains menu options
30 :
40 a$(1)="edit":a$(2)="format":a$(3)="load":a$(4)="save"
50 a$(5)="list":a$(6)="margin"
60 n=6: rem # of items
70 gosub 110
80 printchr$(147)"option"i":"a$(i)
85 rem on i goto 1000,2000,3000, etc.
90 end
95 :
100 rem* menu subroutine *
110 cd$=chr$(17): cu$=chr$(145)
115 hi$="": off$="[146]"
120 aa=(25-n*2)/2
125 print"[147][213]se cursor or joystick up/down to select"
130 fori=1 to aa: print: next
140 fori=1ton: printtab(20-len(a$(i))/2);off$;a$(i): print: next
150 print chr$(19)
160 fori=1 to aa:print: next: i=1
170 printtab(20-len(a$(i))/2);hi$;a$(i)
175 get a$
176 j=peek(56320): rem 56321 for joy #2
177 if j=111 then a$=chr$(13)
178 if j=125 then a$=cd$
179 if j=126 then a$=cu$
180 if a$<>cd$ and a$<>cu$ and a$<>chr$(13) then 175
190 if a$=chr$(13) then return
200 printcu$;tab(20-len(a$(i))/2);off$;a$(i)
210 if a$=cd$ then print: i=i+1: if i>n then 150
220 if a$=cu$ then print cu$cu$cu$;: i=i-1: ifi<1then150
230 goto170